package com.example.ctrip.entity;

/**
 * @author zcy
 * @version 1.0
 * @date 2020-11-13
 * @description Ajax返回
 */

public class ReturnAjax<T> {
    public String code;
    public String state;
    public String msg;
    public String status;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T data;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public ReturnAjax(String code, String state, T data) {
        this.code = code;
        this.state = state;
        this.data = data;
        this.msg = "";
    }

    public ReturnAjax() {
        this.code = "201";
        this.state = "fail";
        this.data = null;
    }

    public ReturnAjax(String code, String state, String msg, T data) {
        this.code = code;
        this.state = state;
        this.msg = msg;
        this.data = data;
    }
}
